/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package convert;

import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;

/**
 *
 * @author QUY_THI
 */
public class ConvertBoolean implements Converter {

    public Object getAsObject(FacesContext context, UIComponent component, String value) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public String getAsString(FacesContext context, UIComponent component, Object value) {
       boolean status=(Boolean)value;
       if(status){
       return "Activated";
       }
       else{
        return "Deactivated";
       }
    }

}
